package com.jims.master.common.utils;

import javax.mail.MessagingException;

/**
 * Created with IntelliJ IDEA.
 * 邮箱发送验证码
 * className: EmailModule
 * User: WangYQ
 * Date Time: 2017-06-21
 */
public class EmailModule {

    /**
     * 注册验证码发送
     *
     * @param email 邮箱
     * @param code   验证码
     * @return
     */
    public static void registCode(String email, String code,String servicePhone) throws MessagingException {
        //设置客服电话
        if(StringUtils.isEmpty(servicePhone)){
            servicePhone = "";
        }else
        {
            servicePhone = "("+servicePhone+")";
        }
        SendMail.sendMail(email,"【北京积目云】","您的动态验证码为：" + code + "，您正在注册医师联盟平台，有效期十分钟，感谢您的使用！如非本人操作，请联系我们"+servicePhone);
    }
}
